.class Lcom/burstly/lib/component/networkcomponent/burstly/html/mraid/SizePositionEvent;
.super Lcom/burstly/lib/component/networkcomponent/burstly/html/mraid/MraidEvent;
.source "SizePositionEvent.java"


# static fields
.field static final EVENT_ID:I = 0x7

.field private static final SIZE:Ljava/lang/String; = "size"


# instance fields
.field private mPrevHeight:F

.field private mPrevWidth:F


# direct methods
.method constructor <init>()V
    .locals 0

    .prologue
    .line 26
    invoke-direct {p0}, Lcom/burstly/lib/component/networkcomponent/burstly/html/mraid/MraidEvent;-><init>()V

    return-void
.end method


# virtual methods
.method fireEvent(Lcom/burstly/lib/component/networkcomponent/burstly/html/mraid/MraidView;[Ljava/lang/Object;)V
    .locals 6
    .parameter "mraidView"
    .parameter "args"

    .prologue
    .line 50
    sget-object v0, Ljava/lang/Boolean;->FALSE:Ljava/lang/Boolean;

    .line 51
    .local v0, forceEvent:Ljava/lang/Boolean;
    invoke-static {p2}, Lcom/burstly/lib/component/networkcomponent/burstly/html/mraid/SizePositionEvent;->checkArgs([Ljava/lang/Object;)Z

    move-result v4

    if-eqz v4, :cond_0

    .line 52
    sget-object v4, Ljava/lang/Boolean;->TRUE:Ljava/lang/Boolean;

    const/4 v5, 0x0

    aget-object v5, p2, v5

    invoke-virtual {v4, v5}, Ljava/lang/Boolean;->equals(Ljava/lang/Object;)Z

    move-result v4

    invoke-static {v4}, Ljava/lang/Boolean;->valueOf(Z)Ljava/lang/Boolean;

    move-result-object v0

    .line 54
    :cond_0
    new-instance v1, Ljava/util/HashMap;

    invoke-direct {v1}, Ljava/util/HashMap;-><init>()V

    .line 55
    .local v1, mapOfParams:Ljava/util/Map;,"Ljava/util/Map<Ljava/lang/String;Ljava/lang/Object;>;"
    invoke-virtual {p1, v1}, Lcom/burstly/lib/component/networkcomponent/burstly/html/mraid/MraidView;->addCurrentPositionValue(Ljava/util/Map;)V

    .line 56
    invoke-virtual {p1}, Lcom/burstly/lib/component/networkcomponent/burstly/html/mraid/MraidView;->getMeasuredWidth()I

    move-result v3

    .line 57
    .local v3, measuredWidth:I
    invoke-virtual {p1}, Lcom/burstly/lib/component/networkcomponent/burstly/html/mraid/MraidView;->getMeasuredHeight()I

    move-result v2

    .line 58
    .local v2, measuredHeight:I
    invoke-virtual {v0}, Ljava/lang/Boolean;->booleanValue()Z

    move-result v4

    if-nez v4, :cond_1

    iget v4, p0, Lcom/burstly/lib/component/networkcomponent/burstly/html/mraid/SizePositionEvent;->mPrevHeight:F

    int-to-float v5, v2

    cmpl-float v4, v4, v5

    if-nez v4, :cond_1

    iget v4, p0, Lcom/burstly/lib/component/networkcomponent/burstly/html/mraid/SizePositionEvent;->mPrevWidth:F

    int-to-float v5, v3

    cmpl-float v4, v4, v5

    if-eqz v4, :cond_2

    .line 59
    :cond_1
    const-string v4, "size"

    invoke-virtual {p1}, Lcom/burstly/lib/component/networkcomponent/burstly/html/mraid/MraidView;->getViewSize()Ljava/lang/String;

    move-result-object v5

    invoke-interface {v1, v4, v5}, Ljava/util/Map;->put(Ljava/lang/Object;Ljava/lang/Object;)Ljava/lang/Object;

    .line 60
    int-to-float v4, v2

    iput v4, p0, Lcom/burstly/lib/component/networkcomponent/burstly/html/mraid/SizePositionEvent;->mPrevHeight:F

    .line 61
    int-to-float v4, v3

    iput v4, p0, Lcom/burstly/lib/component/networkcomponent/burstly/html/mraid/SizePositionEvent;->mPrevWidth:F

    .line 63
    :cond_2
    invoke-virtual {p1, v1}, Lcom/burstly/lib/component/networkcomponent/burstly/html/mraid/MraidView;->fireComplexChangeEvent(Ljava/util/Map;)V

    .line 64
    return-void
.end method
